package commandDemo;

/***************************************
 *
 * 使用命令对象
 *
 **************************************/
public class SimpleRemoteControl {
    private Command slot;

    public SimpleRemoteControl() {
    }
    public void setCommand(Command command){
        this.slot = command;
    }

    public void buttonWasPressed(){
        slot.execute();
    }
}
